package cn.itlaobing.eshop.dao;

import cn.itlaobing.eshop.entity.ItlbFocuss;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler;

import java.sql.SQLException;
import java.util.List;

/**
 * Created by Administrator on 2017/11/14.
 */
public class FocussDao extends BaseDao{

    public List<ItlbFocuss> query()throws SQLException{
        QueryRunner queryRunner=new QueryRunner(getDataSource());
        String sql="SELECT * FROM itlb_focuss";
        BeanListHandler<ItlbFocuss> beanListHandler=new BeanListHandler<ItlbFocuss>(ItlbFocuss.class);
        List<ItlbFocuss> list=queryRunner.query(sql,beanListHandler);
        return list;
    }
}
